package com.zcl.iweibo;

import com.zcl.customcontrols.TabHostEx;
import com.zcl.customcontrols.TabWidgetEx;
import com.zcl.customcontrols.TabActivityEx;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;

public class MainActivity extends TabActivityEx implements IWeiboActivity {

    private TabHostEx mTabHost;
    
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.netqin_main_tab);
		addTabs();
	}

	@Override
	public void init() {
		// TODO Auto-generated method stub

	}

	@Override
	public void refresh(Object... objects) {
		// TODO Auto-generated method stub

	}
	
	 private void addTabs() {
		 mTabHost = (TabHostEx)findViewById(R.id.tabhost_ex);
		 mTabHost.setup();
		 Intent intent = new Intent(this, HomeActivity.class);
		 mTabHost.addTab(intent, this.getResources().getDrawable(R.drawable.icon_home), this.getString(R.string.tab_hone), "home");
		 intent = new Intent(this, MessageActivity.class);
		 mTabHost.addTab(intent, this.getResources().getDrawable(R.drawable.icon_meassage), this.getString(R.string.tab_message), "message");
		 intent = new Intent(this, SelfInfoActivity.class);
		 mTabHost.addTab(intent, this.getResources().getDrawable(R.drawable.icon_selfinfo), this.getString(R.string.tab_selfinfo), "selfinfo");
		 intent = new Intent(this, SquareActivity.class);
		 mTabHost.addTab(intent, this.getResources().getDrawable(R.drawable.icon_square), this.getString(R.string.tab_square), "square");
		 intent = new Intent(this, MoreActivity.class);
		 mTabHost.addTab(intent, this.getResources().getDrawable(R.drawable.icon_more), this.getString(R.string.tab_more), "more");
		 mTabHost.setCurrentTab(0);
	 }
}
